package com.heima.listener;

import com.heima.model.constants.RabbitMQConstants;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 监听队列
 * @author chenshan
 */
@Component
public class RabbitMQListener {
    @RabbitListener(queues = RabbitMQConstants.RABBITMQ_DELAY_QUEUE)
    public void handleMsg(String msg) {
        System.out.println("msg = " + msg);
    }
}
